import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
import java.util.LinkedList;

public record bySelf() {
    public static void main(String[] args) {
        LinkedList<Integer> hh = new LinkedList<>();
        for (int i = 0; i <10; i++) {
            hh.addLast(i);
        }
        System.out.println(hh.removeFirstOccurrence(1));
        System.out.println(hh.remove(1));
        LinkedList<Integer> hhh = new LinkedList<>(hh);
        System.out.println(hhh);
        Iterator<Integer> it = hhh.iterator();//迭代器
        while (it.hasNext()) {
            System.out.print(it.next()+" ");
        }
        LinkedList<Integer> h = (LinkedList<Integer>) hh.clone();
        System.out.println(hh);
    }
}

